<?php
header('Content-Type:application/json');
$code=array("status"=>false,"msg"=>"","data"=>array());
if ($mysqli = new mysqli('localhost', 'songsong', '123456', 'sids')) {
    //echo 'good';
}
$page=$_GET['page'];
$size=$_GET['size'];
$mysqli->query('set names utf8');
$query = "select * from student";
$res=$mysqli->query($query);
$chunk_result=array_chunk($res,$size);
$array=$page;
array_local($array);
$find="select* from student";
$code['data']=mysqli_fetch_all($chunk_result,MYSQLI_ASSOC);
$code['msg'] = 'success';
$ret = json_encode($code);
echo $ret;
$mysqli->close();
?>